package com.huilian.cloud.module.system.dal.mysql.groupdatascope;

import java.util.*;

import com.huilian.cloud.framework.common.pojo.PageResult;
import com.huilian.cloud.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.huilian.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.huilian.cloud.module.system.dal.dataobject.groupdatascope.GroupDatascopeDO;
import org.apache.ibatis.annotations.Mapper;
import com.huilian.cloud.module.system.controller.admin.groupdatascope.vo.*;

/**
 * 用户组数据权限 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface GroupDatascopeMapper extends BaseMapperX<GroupDatascopeDO> {

    default PageResult<GroupDatascopeDO> selectPage(GroupDatascopePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<GroupDatascopeDO>()
                .eqIfPresent(GroupDatascopeDO::getGroupId, reqVO.getGroupId())
                .eqIfPresent(GroupDatascopeDO::getMenuId, reqVO.getMenuId())
                .eqIfPresent(GroupDatascopeDO::getGroupType, reqVO.getGroupType())
                .eqIfPresent(GroupDatascopeDO::getDivide, reqVO.getDivide())
                );
    }

}